import {ApiFetch} from "../api/apiHandler";
import {BaseUrl} from "../constant/constant";

class AIModel {

    constructor(props) {
        this.url = BaseUrl
    }

    get(params) {
        let end = this.url + 'getmatchkey'
        let req = new ApiFetch(end)
        return req.fetch(params)
    }

    add(params) {
        let end = this.url + 'addmatchkey'
        let req = new ApiFetch(end)
        return req.fetch(params)
    }

    delete(params) {
        let end = this.url + 'delmatchkey'
        let req = new ApiFetch(end)
        return req.fetch(params)
    }

    result(params) {
        let end = this.url + 'getaccuracy'
        let req = new ApiFetch(end)
        return req.fetch(params)
    }

    resultByCompany(params) {
        let end = 'http://192.168.0.50:8080/getaccuracy'
        let req = new ApiFetch(end)
        return req.fetch(params)
    }

    getEventList(params) {
        let end = this.url + 'getgamecount'
        let req = new ApiFetch(end, 'get',)
        return req.fetch(params)
    }

}

export default AIModel
